{% load static %}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>写文章</title>
    <link href="{% static 'bootstrap/css/bootstrap.min.css' %}" rel="stylesheet">
    <link href="{% static 'css/cl-css.css' %}" rel="stylesheet">
    <link href="{% static 'font-awesome/css/font-awesome.min.css' %}" rel="stylesheet">
    <link rel="stylesheet" href="{% static 'highlight/styles/railscasts.css' %}">
    <script type="text/javascript" src="../static/ckeditor/ckeditor/ckeditor.js"></script>
</head>
<body>
<div class="cl-header container-fluid" id="app">
    <div class="header-content container">
        <nav class="navbar navbar-expand-lg navbar-light">
            <a class="navbar-brand" href="index.html">
                <img src="../static/img/logo.jpg" width="144" height="72" alt="">
            </a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"
                    aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>

        </nav>
    </div>
</div>
<form class="col-md-6 offset-md-3" method="post" enctype="multipart/form-data">
    {% csrf_token %}
    <br>
    <div class="form-group">
        <label for="avatar">标题插图</label>
        <input type="file" class="form-control-file" name="avatar" id="avatar">
    </div>
    <div class="form-group">
        <label for="title">文章标题</label>
        <input type="text" class="form-control" id="title" name="title" value="">
    </div>
    <div class="form-group">
        <label for="column">栏目</label>
        <select class="form-control" id="category" name="category">
            {% for foo in list %}
                <option value="{{ foo.id }}">{{ foo.title }}</option>
            {% endfor %}
        </select>
    </div>
    <div class="form-group">
        <label for="tags">标签</label>
        <input type="text" class="form-control" id="tags" name="tags" value="">
    </div>
    <div class="form-group">
        <label for="sumary">文章摘要</label>
        <input type="text" class="form-control" id="sumary" name="sumary" value="">
    </div>
    <div class="form-group">
        <label for="content">正文</label>
        <textarea name="content" id="content" rows="10" cols="80"></textarea>
        <script>
            CKEDITOR.replace('content');
        </script>
    </div>
    <button type="submit" class="btn btn-primary" style="margin-left: 12px">完成</button>
</form>
<div class="container-fluid cl-footer">
    <div class="container">
        <p class="cl-copyright">本设计由简.工作室荣誉出品</p>
        <p class="cl-copyright">copyright @ 2017~2018 简.工作室（www.jeanstudio.cn）</p>
    </div>
</div>
<script src="../static/jquery/jquery.min.js"></script>
<script src="../static/bootstrap/js/bootstrap.min.js"></script>
<script src="../static/highlight/highlight.pack.js"></script>
<script src="{% static 'vue/vue-2.5.16.js' %}"></script>
<script src="{% static 'js/host.js' %}"></script>
<script src="{% static 'js/common.js' %}"></script>
<script src="{% static 'js/index.js' %}"></script>
<script>hljs.initHighlightingOnLoad();</script>
</body>
</html>